package stbm.objects;

/**
 * Represents the trade good in the planet
 * 
 * @author Nirav
 * @author Nisha
 * 
 */

public class TradeGood {

	public String name;

	public double price;

	public int quantity;

	/**
	 * Constructor for TradeGood
	 * 
	 * @param name
	 * @param price
	 * @param quantity
	 * 
	 */
	public TradeGood(String name, double price, int quantity) {
		this.name = name;
		this.price = price;
		this.quantity = quantity;
	}

	public String toString() {

		return this.name;

	}

	/**
	 * Returns the price of the tradegood after calculating tax
	 * 
	 * @param tax
	 * @return
	 */
	public double getRealPrice(double tax) {

		double extra = this.price * tax;
		return (price + extra);

	}

}
